package com.intelligencesoft.pss.utils;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.intelligencesoft.pss.entity.listeners.ModelListener;
import com.intelligencesoft.pss.orm.AutoUpdate;

@Component
public class SpringUtil {
	@Autowired
	private AutoUpdate autoUpdate;
	
	
	@PostConstruct
	public void init() {
		System.out.println("spring 初始化");
		ModelListener.addModelHandler(autoUpdate);
	}

	@PreDestroy
	public void dostory() {

	}
}
